class Login{
    name:string;
    pwd:string;
    constructor(name:string,pwd:string){
        this.name = name;
        this.pwd = pwd;
    }
    doLogin(){
        const param = {
            name : this.name,
            pwd : this.pwd
        }
        console.log('login',param);
    }
}

const loginTs = new Login('xiaoguan','123456');

loginTs.doLogin();